#!/usr/bin/python
# -*- coding: UTF-8 -*-
import re

#duqu
with open("./MF_S01E24_1.log") as f:
    i=1
    frame_num=0
    person_num=0
    current_frameid="0"
    current_person=0
    line = f.readline()
    while line:
        if len(line)<20: 
            line = f.readline()
            continue
        str = re.split("\/|\.|\_|\,", line)
        frame_id = str[5]
        person = str[7]
        if current_frameid!=frame_id:
        	frame_num=frame_num+1
        	if person!="no":
        		current_person=1
        		person_num=person_num+1
        	else:
        		current_person=0
        	current_frameid=frame_id
        elif current_person==0 and person!="no":
        	current_person=1
        	person_num=person_num+1

    	i=i+1
    	line = f.readline()

print "total frame:%d"%frame_num
print "frame num (has person)%d"%person_num